# -*- coding: utf-8 -*-
"""
@ Created on 2024-06-14 12:23
---------
@summary: 状态码常量
---------
@author: Lsaiah
"""

# HTTP 状态码
HTTP_200_OK = 200
HTTP_201_CREATED = 200
HTTP_204_NO_CONTENT = 200
HTTP_400_BAD_REQUEST = 400
HTTP_401_UNAUTHORIZED = 401
HTTP_403_FORBIDDEN = 403
HTTP_404_NOT_FOUND = 404
HTTP_405_METHOD_NOT_ALLOWED = 405
HTTP_409_CONFLICT = 409
HTTP_422_UNPROCESSABLE_ENTITY = 422
HTTP_429_TOO_MANY_REQUESTS = 429
HTTP_500_INTERNAL_SERVER_ERROR = 500
HTTP_502_BAD_GATEWAY = 502
HTTP_503_SERVICE_UNAVAILABLE = 503

# 业务状态码
CODE_SUCCESS = 200
CODE_FAILED = 400
CODE_ERROR = 500
CODE_UNAUTHORIZED = 401
CODE_FORBIDDEN = 403
CODE_NOT_FOUND = 404
CODE_VALIDATION_ERROR = 422
CODE_CONFLICT = 409
CODE_RATE_LIMIT = 429

# 用户相关状态码
CODE_USER_LOGIN_SUCCESS = 200
CODE_USER_LOGIN_FAILED = 400
CODE_USER_REGISTER_SUCCESS = 200
CODE_USER_REGISTER_FAILED = 400
CODE_USER_NOT_FOUND = 404
CODE_USER_ALREADY_EXISTS = 409
CODE_USER_PASSWORD_ERROR = 400
CODE_USER_TOKEN_EXPIRED = 401
CODE_USER_TOKEN_INVALID = 401

# 权限相关状态码
CODE_PERMISSION_DENIED = 403
CODE_ROLE_NOT_FOUND = 404
CODE_PERMISSION_NOT_FOUND = 404

# 数据相关状态码
CODE_DATA_CREATE_SUCCESS = 200
CODE_DATA_UPDATE_SUCCESS = 200
CODE_DATA_DELETE_SUCCESS = 200
CODE_DATA_QUERY_SUCCESS = 200
CODE_DATA_NOT_FOUND = 404
CODE_DATA_ALREADY_EXISTS = 409
CODE_DATA_VALIDATION_ERROR = 422

# 文件相关状态码
CODE_FILE_UPLOAD_SUCCESS = 200
CODE_FILE_UPLOAD_FAILED = 400
CODE_FILE_NOT_FOUND = 404
CODE_FILE_TOO_LARGE = 413
CODE_FILE_TYPE_NOT_ALLOWED = 415

# 系统相关状态码
CODE_SYSTEM_MAINTENANCE = 503
CODE_SYSTEM_BUSY = 503
CODE_NETWORK_ERROR = 502
CODE_DATABASE_ERROR = 500
CODE_REDIS_ERROR = 500